package com.hx.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.hx.entity.Teacher;
import com.hx.repository.TeacherRep;

@Component
public class TeacherService {
	@Autowired
   private TeacherRep teacherRep;
   public List<Teacher> getAll(){
	   return (List<Teacher>) teacherRep.findAll();
   }
   public String getName(Integer teaid) {
	return teacherRep.findOne(teaid).getName();
}
}
